﻿using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Matrix.GUI.Tests
{
   [TestClass]
   public class TC_MG01
   {
      /// <summary>
      /// This test cast tests requirement MG01, the The input matrix shall display 2 matrix's
      /// </summary>
      [TestMethod]
      public void TestMethod1_MG01()
      {
         MainWindow window = new MainWindow();
         window.Show();
         TestVisuals(window);
      }

      public void TestVisuals(MainWindow window)
      {
         var list = StaticGUITests.FindVisualChildren<MatrixControl>(window);
         Assert.IsTrue(list.Count() == 3);

         foreach (var visual in list)
         {
            StaticGUITests.IsElementVisible(visual, window);
         }
      }
   }
}
